package com.simpleplayer.contentview;

import android.annotation.SuppressLint;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.View;

import androidx.annotation.IntDef;
import androidx.annotation.NonNull;

public interface ContentView {

    @IntDef({VIEW_TYPE_SurfaceView, VIEW_TYPE_TextureView, VIEW_TYPE_GLSurfaceView})
    @interface VIEWTYPE {}

    @IntDef({DIRECT, SPHERE})
    @interface RENDERTYPE {}

    int VIEW_TYPE_SurfaceView = 0;
    int VIEW_TYPE_TextureView = 1;
    int VIEW_TYPE_GLSurfaceView = 2;

    int DIRECT = 0;
    int SPHERE = 1;

    interface SurfaceListener {
        void onSurfaceCreate(@NonNull Surface surface);
        void onSurfaceDestroy(@NonNull Surface surface);
        void onSurfaceHolderCreate(@NonNull SurfaceHolder holder);
    }

    void onContentSizeChanged(int width, int height);

    @NonNull
    View getView();
}
